/*   1:    */ package org.jetbrains.generate.tostring.util;
/*   2:    */ 
/*   3:    */ public class StringUtil
/*   4:    */ {
/*   5:    */   public static boolean isEmpty(String paramString)
/*   6:    */   {
/*   7: 36 */     return (paramString == null) || (paramString.trim().length() == 0);
/*   8:    */   }
/*   9:    */   
/*  10:    */   public static boolean isNotEmpty(String paramString)
/*  11:    */   {
/*  12: 46 */     return !isEmpty(paramString);
/*  13:    */   }
/*  14:    */   
/*  15:    */   public static boolean hasUpperCaseChar(String paramString)
/*  16:    */   {
/*  17: 55 */     char[] arrayOfChar1 = paramString.toCharArray();
/*  18: 56 */     for (char c : arrayOfChar1) {
/*  19: 57 */       if (Character.isUpperCase(c)) {
/*  20: 58 */         return true;
/*  21:    */       }
/*  22:    */     }
/*  23: 61 */     return false;
/*  24:    */   }
/*  25:    */   
/*  26:    */   public static boolean hasLowerCaseChar(String paramString)
/*  27:    */   {
/*  28: 70 */     char[] arrayOfChar1 = paramString.toCharArray();
/*  29: 71 */     for (char c : arrayOfChar1) {
/*  30: 72 */       if (Character.isLowerCase(c)) {
/*  31: 73 */         return true;
/*  32:    */       }
/*  33:    */     }
/*  34: 76 */     return false;
/*  35:    */   }
/*  36:    */   
/*  37:    */   public static String after(String paramString1, String paramString2)
/*  38:    */   {
/*  39: 90 */     if (paramString1 == null) {
/*  40: 91 */       return null;
/*  41:    */     }
/*  42: 94 */     int i = paramString1.indexOf(paramString2);
/*  43: 95 */     if (i == -1) {
/*  44: 96 */       return paramString1;
/*  45:    */     }
/*  46: 99 */     return paramString1.substring(i + paramString2.length());
/*  47:    */   }
/*  48:    */   
/*  49:    */   public static String before(String paramString1, String paramString2)
/*  50:    */   {
/*  51:115 */     if (paramString1 == null) {
/*  52:116 */       return null;
/*  53:    */     }
/*  54:119 */     int i = paramString1.indexOf(paramString2);
/*  55:120 */     if (i == -1) {
/*  56:121 */       return paramString1;
/*  57:    */     }
/*  58:124 */     return paramString1.substring(0, i);
/*  59:    */   }
/*  60:    */   
/*  61:    */   public static String middle(String paramString1, String paramString2, String paramString3)
/*  62:    */   {
/*  63:139 */     String str = after(paramString1, paramString2);
/*  64:140 */     return before(str, paramString3);
/*  65:    */   }
/*  66:    */   
/*  67:    */   public static String firstLetterToLowerCase(String paramString)
/*  68:    */   {
/*  69:154 */     if (paramString.length() > 1) {
/*  70:155 */       return Character.toLowerCase(paramString.charAt(0)) + paramString.substring(1);
/*  71:    */     }
/*  72:156 */     if (paramString.length() == 1) {
/*  73:157 */       return String.valueOf(Character.toLowerCase(paramString.charAt(0)));
/*  74:    */     }
/*  75:159 */     return paramString;
/*  76:    */   }
/*  77:    */ }


/* Location:           E:\idea\
 * Qualified Name:     org.jetbrains.generate.tostring.util.StringUtil
 * JD-Core Version:    0.7.0.1
 */